/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * TrainingBook
 * Copyright (C) Arnaud Duval 2011 <arnaud.duval@gmail.com>
 *
 * Projects is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Projects is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _USER_DAY_EDIT_DIALOG_HPP_
#define _USER_DAY_EDIT_DIALOG_HPP_


#define HUMOR_DESCR "1 : Super forme et sensations, énorme envie de faire du vélo et des compétitions", \
                    "2 : Bonnes forme et sensations, envie d'entraînement et de compétitions", \
                    "3 : Bonnes forme et récupération", \
                    "4 : Plus ou moins bien selon le terrain et l'instant", \
                    "5 : Sensations moyennes pour des raisons diverses", \
                    "6 : Sensations moyennes avec mauvaise récupération", \
                    "7 : Mal aux jambes, limité dans l'effort", \
                    "8 : Nonchalance, mauvaise sensation sur le vélo", \
                    "9 : Aucune force, besoin de récupérer", \
                    "10 : Épuisé, rien envie de faire dans la journée"

#define SENSATIONS_DESCR "10 : De très mauvaise humeur", \
                         "9 : Déprimé", \
                         "8 : Irritable", \
                         "7 : Nerveux", \
                         "6 : Anxieux", \
                         "5 : Détendu", \
                         "4 : Calme", \
                         "3 : Très cool", \
                         "2 : Très joyeux", \
                         "1 : De très bonne humeur, très heureux"

#define MIN_HUMOR_INDEX 1
#define MAX_HUMOR_INDEX 10
#define MIN_SENSATIONS_INDEX 1
#define MAX_SENSATIONS_INDEX 10



#include <gtkmm.h>
#include "user-day.hpp"
#include <DateTime.hpp>
#include <DateTimeEntry.hpp>
#include "double-entry.hpp"
#include "integer-entry.hpp"

///@class UserDayEditDialog
///@brief Dialog box for editing a user day
class UserDayEditDialog: public Gtk::Dialog
{
    public:
        ///@brief Constructor
        UserDayEditDialog(std::string titre, Gtk::Window *parent,
                            UserDay lastDay);
        ///@brief Destructor
        virtual ~UserDayEditDialog();
        ///@brief Update current UserDay with value in the form
        void UpdateUserDay();
        ///@brief Update the content of the dialog with current user day values
        void Update();
        ///@brief Return the current UserDay
        UserDay GetUserDay();
        ///@brief Set the date of the current user day
        void SetDate(DateTime);

    protected:
        ///@brief Fill the labels
        void FillLabels();

    private:
        ///@brief UserDay in edition
        UserDay currentDay;

        ///@brief Date edition
        Gtk::HBox dateHBox;
        Gtk::Label dateLabel;
        Gtk::Button dateButton;
        DateTimeEntry dateEntry;

        ///@brief Time edition
        Gtk::HBox timeHBox;
        Gtk::Label timeLabel;
        DateTimeEntry timeEntry;

        ///@brief Weight edition
        Gtk::HBox weightHBox;
        Gtk::Label weightLabel;
        DoubleEntry weightEntry;

        ///@brief Height edition
        Gtk::HBox heightHBox;
        Gtk::Label heightLabel;
        DoubleEntry heightEntry;

        ///@brief Humor index edition
        Gtk::HBox humorHBox;
        Gtk::Label humorLabel;
        Gtk::ComboBoxText humorCBT;

        ///@brief Sensations index edition
        Gtk::HBox sensationsHBox;
        Gtk::Label sensationsLabel;
        Gtk::ComboBoxText sensationsCBT;

        ///@brief Rest heart rate edition
        Gtk::HBox restHRHBox;
        Gtk::Label restHRLabel;
        IntegerEntry restHREntry;

        ///@brief Maximum heart rate edition
        Gtk::HBox maxHRHBox;
        Gtk::Label maxHRLabel;
        IntegerEntry maxHREntry;

        
};

#endif // _USER_DAY_EDIT_DIALOG_HPP_
